<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

    </style>
</head>
<body>

</body>
<script>
    var xhr=new XMLHttpRequest();//请求
    xhr.onload=function () {
        if (xhr.readyState==4&&xhr.status==200){//状态值 状态码
        }
    }
    xhr.open('post','./books.xml',true);
    xhr.send();//发送
</script>
</html>